import {lazy, Suspense} from 'react'
import { useRoutes } from "react-router-dom";
import Login  from '../views/Login/Login'
// import Text from '../pages/text';
// const Reg= lazy(()=> import('../pages/Reg'))
const routes=[
    {
        path: '/login',
        element: <Suspense fallback={<div>loadding</div>}><Login /></Suspense>,
    },
    // {
    //     path: '/reg',
    //     element: <Reg />,
    //     children:[
    //       {
    //           path: 'text',
    //           element: <Suspense fallback={<div>loadding</div>}><Text /></Suspense>,
    //       }
    //   ]
    // }
]

export default ()=>{
  return useRoutes(routes);

}